#include "server.h"
#include <iostream>
#include <boost/format.hpp>
#include <boost/regex.hpp>
using namespace std;


void AsioServer::Greeting(const string& name)
{	
	using namespace boost;
	regex pattern( "[0-9]+" );
	cmatch what;
	if( regex_match( name.c_str(), what, pattern ) )
	{
		cout << "Numbers are not allowed!" << endl;
	}
	else{
		format output("Hello, %s");
		cout << (output % name).str() << endl;	
	}
}
